import Vue from 'vue'
import Router from 'vue-router'
import login from '@/views/login'
// import business from '@/views/business/Index'

import system from '@/views/system/Index'
import user from '@/views/system/user'
import role from '@/views/system/role'
import menu from '@/views/menu/index'
import addmenu from '@/views/menu/add'

import msg from '@/views/system/msg'
import notice from '@/views/system/notice'
import add_notice from '@/views/system/add_notice'
import notice_detail from '@/views/system/notice_detail'
import set from '@/views/system/set'


// 题库相关
import answer from '@/views/answer/index'
import dellist from '@/views/answer/dellist'
import addanswer from '@/views/answer/addanswer'
import answerlist from '@/views/answer/answerlist'
import addsubject from '@/views/answer/addsubject'
import editscore from '@/views/answer/editscore'
import answerview from '@/views/answer/view'



import business from '@/views/home/Index'
import dictionary_type from '@/views/dictionary/type'
import dictionary_policy_category from '@/views/dictionary/policy-category'


import template_index from '@/views/template/index'
import template_add from '@/views/template/add'
import project_index from '@/views/project/index'
import project_add from '@/views/project/add'
import project_delete from '@/views/project/delete'
import project_edit from '@/views/project/edit/index'
import project_detail from '@/views/project/detail/index'
import project_review from '@/views/project/review'
import projectanswer from '@/views/answer/projectanswer'



// 机构管理
import institution_index from '@/views/institution/index'

// 政策管理
import policy_management_policy_index from '@/views/policy-management/policy/index'


import notFound from '@/views/notFound'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/notFound',
      name: 'notFound',
      component: notFound
    },
    {
      path: '/',
      name: 'business',
      component: business,
      exta:['仪表盘']
    },
    // {
    //   path: '/index/next',
    //   name: 'next',
    //   component: next,
    //   exta:['业务管理','下级数据']
    // },

    {
      path: '/login',
      name: 'login',
      component: login,
      exta:['登录']
    },

    // {
    //   path: '/password',
    //   name: 'password',
    //   component: password,
    //   exta:['密码']
    // },

    {
      path: '/system/index',
      name: 'system',
      component: system,
      exta:['系统管理','部门管理']
    },

    {
      path: '/system/user',
      name: 'user',
      component: user,
      exta:['系统管理','人员管理']
    },
    {
      path: '/system/role',
      name: 'role',
      component: role,
      exta:['系统管理','角色管理']
    },


    {
      path: '/system/menu',
      name: 'menu',
      component: menu,
      exta:['系统管理','菜单管理']
    },
    {
      path: '/system/msg',
      name: 'msg',
      component: msg,
      exta:['通知消息']
    },
    {
      path: '/system/addmenu',
      name: 'addmenu',
      component: addmenu,
      exta:['系统管理','菜单管理','编辑菜单']
    },


    {
      path: '/dictionary/type',
      name: 'dictionary_type',
      component: dictionary_type,
      exta:['数据字典','机构类型']
    },

    {
      path: '/dictionary/policy-category',
      name: 'dictionary_policy_category',
      component: dictionary_policy_category,
      exta:['数据字典','公告分类']
    },

    {
      path: '/project/index',
      name: 'project_index',
      component: project_index,
      exta:['项目管理','项目列表']
    },
    {
      path: '/project/delete',
      name: 'project_delete',
      component: project_delete,
      exta:['项目管理','项目回收站']
    },
    {
      path: '/project/add',
      name: 'project_add',
      component: project_add,
      exta:['项目管理','项目列表','新增']
    },
    {
      path: '/project/edit',
      name: 'project_edit',
      component: project_edit,
      exta:['项目管理', '项目列表', '编辑']
    },
    {
      path: '/project/detail',
      name: 'project_detail',
      component: project_detail,
      exta:['项目管理', '项目列表', '详情']
    },
    {
      path: '/project/review',
      name: 'project_review',
      component: project_review,
      exta:['项目管理', '项目列表', '审核']
    },
    {
      path: '/answer/projectanswer',
      name: 'projectanswer',
      component: projectanswer,
      exta:['项目管理', '项目列表', '预览答题']
    },

    {
      path: '/institution/index',
      name: 'institution_index',
      component: institution_index,
      exta:['机构管理', '机构列表']
    },
    {
      path: '/policy_management/policy/index',
      name: 'policy_management_policy_index',
      component: policy_management_policy_index,
      exta:['公告管理', '公告列表']
    },
    {
      path: '/answer/index',
      name: 'answer',
      component: answer,
      exta:['题库管理']
    },
    {
      path: '/answer/dellist',
      name: 'dellist',
      component: dellist,
      exta:['题库管理']
    },
    {
      path: '/answer/addanswer',
      name: 'addanswer',
      component: addanswer,
      exta:['题库管理']
    },
    {
      path: '/answer/answerlist',
      name: 'answerlist',
      component: answerlist,
      exta:['题库管理']
    },
    {
      path: '/answer/addsubject',
      name: 'addsubject',
      component: addsubject,
      exta:['题库管理']
    },

    {
      path: '/answer/answerview',
      name: 'answerview',
      component: answerview,
      exta:['题库管理']
    }

  ]
})
